package com.xuecheng.teaching.api;


import com.xuecheng.commons.model.dto.Comment2Dto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.CommentVo;
import com.xuecheng.commons.model.vo.PageResponseResult;

import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


import java.util.List;

@FeignClient("xc-teaching-service")
public interface TeachingClient {


    @GetMapping("/course-comment/list-all")
    public PageResponseResult<List<CommentVo>> listAll(@RequestParam("request") PageRequest request);

    /*//课程评论列表
    @PostMapping("/course-comment/for-course")
    public PageResponseResult<List<CommentVo>> commentList(@RequestParam PageRequest request, @RequestBody Comment2Dto dto);*/

    // 删除评论
    @DeleteMapping("/course-comment/{commentId}")
    public ResponseResult deleteByCommentId(@PathVariable("commentId") Integer commentId);


    // 机构模糊查询
    @GetMapping("/like")
    public PageResponseResult<List<CommentVo>> like(@RequestParam("courseName") String courseName);
}

